﻿Imports PayPalIPN
Partial Public Class _Default
    Inherits System.Web.UI.Page
    Private WithEvents _ipnEvent As IPNEvents = Nothing

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim ppIPN As New IPN(IPN.Environment.BetaSandBox)
        _ipnEvent = ppIPN.IPNEvent
        ppIPN.LoadIPN()
    End Sub

    Protected Sub webAcceptEvent(ByVal ipn As IPNRequest) Handles _ipnEvent.Web_AcceptEvent
        'trap the event and run your code
    End Sub
End Class